import React, { Component } from 'react'
import { NavBar } from 'antd-mobile';
import { withRouter } from "react-router-dom";
import PropTypes from 'prop-types';
import './index.scss'

class index extends Component {
    render() {

        return (
            <NavBar
                className="navHeader"
                mode="light"
                icon={<i className='iconfont icon-back' />}
                onLeftClick={() => this.props.history.go(-1)}
            >{this.props.children}</NavBar>
        )
    }
}

index.propTypes = {
    children: PropTypes.string.isRequired
};

export default withRouter(index)
